package com.paper.tiger.easy.rpc.core;

import java.io.Serializable;

/**
 * [简要描述]: 客户端想注册中心注册服务信息
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/5/28 17:28
 * @since JDK 1.8
 */
public class RegisterServerMesage implements Serializable
{

    /**
     * 提供服务id
     */
    private String ip;

    /**
     * 端口
     */
    private Integer port;

    /**
     * 实现类全限定名
     */
    private String implClassName;
    /**
     * 接口全限定名
     */
    private String interfaceClassName;


    public String getIp()
    {
        return ip;
    }

    public void setIp(String ip)
    {
        this.ip = ip == null ? null : "".equals(ip.trim()) ? null : ip.trim();
    }

    public Integer getPort()
    {
        return port;
    }

    public void setPort(Integer port)
    {
        this.port = port;
    }


    public void setImplClass(Class implClass)
    {

        this.implClassName = implClass.getName();
    }

    public String getImplClass()
    {
        return implClassName;
    }

    public void setInterfaceClass(Class interfaceClass)
    {
        this.interfaceClassName = interfaceClass.getName();
    }

    public String getInterfaceClass()
    {
        return interfaceClassName;
    }

    @Override
    public String toString()
    {
        return "RegisterServerMesage{" + "ip='" + ip + '\'' + ", port=" + port + ", implClass=" + implClassName
                + ", interfaceClass=" + interfaceClassName + '}';
    }
}
